home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol A-4
/
(Vol A-4) Vol. A4.iso
/
Games
/
webby.swf
/
scripts
/
frame_27
/
PlaceObject2_168_361
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
Wrap
Text File
|
2008-03-12
|
2KB
|
68 lines
onClipEvent(enterFrame){
set("/:mapx",_root.map._x);
set("/:mapy",_root.map._y);
set("/:w",_root.map._width);
set("/:h",_root.map._height);
if(Number(eval("/:room")) == 0)
{
set("/:w",eval("/:w") + 0);
}
else if(Number(eval("/:room")) == 1)
{
set("/:w",eval("/:w") + 20);
_root.map._width = Math.round(eval("/:w"));
set("/:h",eval("/:w") * 0.7222222222222222);
_root.map._height = eval("/:h");
}
else if(Number(eval("/:room")) == 2)
{
if(Number(eval("/:w")) >= 380)
{
set("/:w",eval("/:w") - 20);
}
ba = (eval("/:w") - 360) / 20;
set("/:bmx",Math.abs((eval("/:mapx") - 200) / ba));
set("/:bmy",Math.abs((eval("/:mapy") - 150) / ba));
if(Number(eval("/:mapx")) < 200)
{
set("/:mapx",eval("/:mapx") + eval("/:bmx"));
}
if(Number(eval("/:mapx")) > 200)
{
set("/:mapx",eval("/:mapx") - eval("/:bmx"));
}
if(Number(eval("/:mapy")) < 150)
{
set("/:mapy",eval("/:mapy") + eval("/:bmy"));
}
if(Number(eval("/:mapy")) > 150)
{
set("/:mapy",eval("/:mapy") - eval("/:bmy"));
}
_root.map._width = Math.round(eval("/:w"));
set("/:h",eval("/:w") * 0.7222222222222222);
_root.map._height = eval("/:h");
}
_root.map._x = eval("/:mapx");
_root.map._y = eval("/:mapy");
set("/:ml",200 + (eval("/:w") - 360) / 2);
set("/:mr",200 - (eval("/:w") - 360) / 2);
set("/:mt",150 + (eval("/:h") - 260) / 2);
set("/:md",150 - (eval("/:h") - 260) / 2);
if(Number(eval("/:move")) == 1)
{
startDrag("/map",0,eval("/:ml"),eval("/:mt"),eval("/:mr"),eval("/:md"));
}
else if(Number(eval("/:move")) == 0)
{
stopDrag();
}
if(Number(eval("/:find")) == 7)
{
tellTarget("/")
{
nextFrame();
}
}
}